* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #343a40;
    line-height: 1.6;
}

/* 顶部导航栏样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    height: 70px;
    background: linear-gradient(135deg, #2c3e50, #4a5568);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.system-name {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.system-name i {
    margin-right: 10px;
    color: #48c78e;
}

.user-actions {
    display: flex;
    gap: 20px;
}

.user-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.user-btn i {
    margin-right: 5px;
}

/* 主体内容样式 */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 25px;
}

.page-title {
    font-size: 28px;
    margin-bottom: 25px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
}

.page-title i {
    margin-right: 10px;
    color: #3498db;
}

/* 按钮样式 */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    font-size: 15px;
}

.btn i {
    margin-right: 6px;
}

.btn-primary {
    background: linear-gradient(to right, #3498db, #1e88e5);
    color: white;
    box-shadow: 0 2px 5px rgba(30, 136, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(to right, #2c8cc9, #1976d2);
    box-shadow: 0 3px 8px rgba(30, 136, 229, 0.4);
    transform: translateY(-2px);
}

.btn-edit {
    background: linear-gradient(to right, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 2px 5px rgba(230, 126, 34, 0.3);
}

.btn-edit:hover {
    background: linear-gradient(to right, #e09411, #d37420);
    box-shadow: 0 3px 8px rgba(230, 126, 34, 0.4);
    transform: translateY(-2px);
}

.btn-delete {
    background: linear-gradient(to right, #e74c3c, #d63031);
    color: white;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.btn-delete:hover {
    background: linear-gradient(to right, #d14030, #c22525);
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.4);
    transform: translateY(-2px);
}

/* 表格样式 */
.table-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e9ecef;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 16px;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 2px -1px rgba(0,0,0,0.05);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #f8fafc;
}

.actions-cell {
    display: flex;
    gap: 10px;
}

/* 表格标题栏 */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.table-title {
    font-weight: 600;
    color: #495057;
    font-size: 18px;
}

/* 表格底部 */
.table-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.department-count {
    color: #6c757d;
    font-size: 14px;
}

/* 加载动画 */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.loader {
    border: 4px solid rgba(52, 152, 219, 0.2);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #adb5bd;
}

.empty-state p {
    font-size: 18px;
    margin-top: 10px;
}

/* 错误提示 */
.error-message {
    background: #fff0f0;
    border-left: 4px solid #e74c3c;
    padding: 15px 20px;
    margin-top: 20px;
    border-radius: 4px;
    color: #c92a2a;
    font-weight: 500;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 450px;
    max-width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #3498db, #1e88e5);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-weight: 500;
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.modal-footer {
    padding: 15px 25px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel {
    background-color: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: linear-gradient(to right, #48c78e, #3ec487);
}

.toast-error {
    background: linear-gradient(to right, #e74c3c, #d63031);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 0 15px;
    }

    .system-name {
        font-size: 18px;
    }

    .user-btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    .container {
        padding: 0 15px;
    }

    th, td {
        padding: 12px 15px;
    }

    .actions-cell {
        flex-direction: column;
        gap: 8px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}